/*

@Author:李朝晖

@Date: 2018-12-12

@Last Modified time: 2018-12-16
*/
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class AuthService {

 
  constructor() { }

  private static user_id = 0;
  private static position = "";

  static getUserId(): number{
    return AuthService.user_id;
  }
  static getPosition(): string{
    return AuthService.position;
  }

  static login(id: number, position: string): void {
    this.user_id=id;
    this.position = position;
  }

  static logout(): void {
    this.user_id = 0;
  }
}